package com.google.android.vending.expansion.downloader;

import android.app.Notification;
import android.app.NotificationManager;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.telephony.TelephonyManager;
import android.util.Log;

class SystemFacade
{
  private Context mContext;
  private NotificationManager mNotificationManager;

  public SystemFacade(Context paramContext)
  {
    this.mContext = paramContext;
    this.mNotificationManager = ((NotificationManager)this.mContext.getSystemService("notification"));
  }

  public void cancelAllNotifications()
  {
    this.mNotificationManager.cancelAll();
  }

  public void cancelNotification(long paramLong)
  {
    this.mNotificationManager.cancel((int)paramLong);
  }

  public long currentTimeMillis()
  {
    return System.currentTimeMillis();
  }

  public Integer getActiveNetworkType()
  {
    ConnectivityManager localConnectivityManager = (ConnectivityManager)this.mContext.getSystemService("connectivity");
    if (localConnectivityManager == null)
      Log.w("LVLDL", "couldn't get connectivity manager");
    NetworkInfo localNetworkInfo;
    do
    {
      return null;
      localNetworkInfo = localConnectivityManager.getActiveNetworkInfo();
    }
    while (localNetworkInfo == null);
    return Integer.valueOf(localNetworkInfo.getType());
  }

  public Long getMaxBytesOverMobile()
  {
    return Long.valueOf(2147483647L);
  }

  public Long getRecommendedMaxBytesOverMobile()
  {
    return Long.valueOf(2097152L);
  }

  public boolean isNetworkRoaming()
  {
    ConnectivityManager localConnectivityManager = (ConnectivityManager)this.mContext.getSystemService("connectivity");
    if (localConnectivityManager == null)
    {
      Log.w("LVLDL", "couldn't get connectivity manager");
      return false;
    }
    NetworkInfo localNetworkInfo = localConnectivityManager.getActiveNetworkInfo();
    if ((localNetworkInfo != null) && (localNetworkInfo.getType() == 0));
    TelephonyManager localTelephonyManager;
    for (int i = 1; ; i = 0)
    {
      localTelephonyManager = (TelephonyManager)this.mContext.getSystemService("phone");
      if (localTelephonyManager != null)
        break;
      Log.w("LVLDL", "couldn't get telephony manager");
      return false;
    }
    if ((i != 0) && (localTelephonyManager.isNetworkRoaming()));
    for (boolean bool = true; ; bool = false)
      return bool;
  }

  public void postNotification(long paramLong, Notification paramNotification)
  {
    this.mNotificationManager.notify((int)paramLong, paramNotification);
  }

  public void sendBroadcast(Intent paramIntent)
  {
    this.mContext.sendBroadcast(paramIntent);
  }

  public void startThread(Thread paramThread)
  {
    paramThread.start();
  }

  public boolean userOwnsPackage(int paramInt, String paramString)
    throws PackageManager.NameNotFoundException
  {
    int i = this.mContext.getPackageManager().getApplicationInfo(paramString, 0).uid;
    boolean bool = false;
    if (i == paramInt)
      bool = true;
    return bool;
  }
}

/* Location:           E:\android\Toy Defense 2_dex2jar.jar
 * Qualified Name:     com.google.android.vending.expansion.downloader.SystemFacade
 * JD-Core Version:    0.6.2
 */